/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package utilities;

import entities.Match;
import javax.swing.ProgressMonitor;

/**
 *
 * @author olawale
 */
public class Test {


    public static void main(String ...args){
//        Selection ss = new Selection(new RatedColumn("ttr", 8), false, null);
//        Selection dd = new Selection(new RatedColumn("ttr", 2), true, null);
//        System.out.println(ss.equals(dd));

        new Test().s();

    }

    public void s(){
        A b = new B();
        new T(b);
    }

    static void add(String m){
        System.out.println("string");
    }

    static void add(Object m){
        System.out.println("object");
    }

    public static <T> String aa(T t){
//        System.out.println(">>" + Type.getType(t.getClass()));
//        t.getClass().getMethods();
        String type = "";
        try{
            type = t.getClass().getName();
            System.out.println(t.getClass().getSimpleName() + " " + t.getClass().getName() + " " +
                    t.getClass().isArray());
        }catch(Exception ex){}
        return type;
    }

    public static void mm(){
        Match m = new Match();
        try{
            System.out.println(m.getClass().getDeclaredMethods()[10].getParameterTypes()[0].getName());
        }catch(Exception ex){}
    }

    private static boolean compare(String type){
        if(type.equals("javax.swing.table.DefaultTableModel")){
            System.out.println(1);
        }else if(type.equals("java.lang.Long")){
            System.out.println(2);
        }else if(type.equals("java.lang.Integer")){
            System.out.println(3);
        }else if(type.equals("entities.Match")){
            System.out.println(4);
        }else if(type.equals("java.lang.String")){
            System.out.println(5);
        }else if(type.equals("[Ljava.lang.Object;")){
            System.out.println(6);
        }else if(type.equals("java.util.Date")){
            System.out.println(7);
        }
        return false;
    }

    class A{ }

    class B extends A{}

    class T{
        T(A a){
            System.out.println("called a");
            System.out.println(a.getClass());
        }

        T(B b){
            System.out.println("called b");
        }
    }


//    public static

}
